﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AliboboStockLib.date;
using AliboboStockLib.webutil;

namespace AliboboStockLib.stockupdater.tseWeightIndex
{
    public class TseWightIndexMinuteUpdater
    {
        protected String getURL(DateTime d)
        {
            String url = String.Format("http://www.twse.com.tw/ch/trading/exchange/MI_5MINS_INDEX/genpage/Report{0}/A121{1}.php?chk_date={2}", DateUtils.getYYYYMMPlanString(d), DateUtils.getPlanString(d), DateUtils.getROCString(d));
            return url;
        }
        public bool processDate(DateTime d)
        {

            if (d.DayOfWeek.Equals(DayOfWeek.Sunday) || d.DayOfWeek.Equals(DayOfWeek.Saturday))
            {
                return true;
            }
            String url = getURL(d);
            String content=HttpGet.requestBig5(url);

            





            return true;
        }


    }
}
